﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UCenterLib {
    public class UCHtmlHelper {
        public static string AvatarSrc(int userId, string size) {
            return UCConfig.UC_API +
                string.Format("avatar.php?uid={0}&type=virtual&size=small", userId);

            //// http://uc.ichuyou.com/data/avatar/000/10/00/68_avatar_small.jpg

            //if (size != "small" && size != "middle" && size != "big") {
            //    size = "small";
            //}
            
            //string userIdSplited = userId.ToString();
            //while (userIdSplited.Length < 9) {
            //    userIdSplited = "0" + userIdSplited;
            //}

            //return UCConfig.UC_API + "data/avatar/" + 
            //    userIdSplited.Insert(7, "/").Insert(5, "/").Insert(3, "/") + "_avatar_" + size + ".jpg";
        }

        //public static string AvatarSrc(string username) {
        //    return string.Empty;
        //}
    }
}
